package com.dong.design.memento.memento_prototype;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jianyang206881
 * @date 2018/6/28
 */
public class Caretaker {
    private List<HeroMemento> mementoList = new ArrayList<>();

    public void add(HeroMemento heroMemento) {
        mementoList.add(heroMemento);
    }

    public HeroMemento get(int index) {
        return mementoList.get(index);
    }
}
